package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.List;

@TableName("t_sellOrder")
public class SellOrderBean {
    /**销售订单id*/
    @TableId(value = "pk_sellOrderId", type = IdType.AUTO)
    private Integer sellOrderId;
    /**销售订单的客户名字*/
    @TableField("so_customer")
    private String customer;
    /**销售订单中销售员*/
    @TableField("so_seller")
    private String seller;
    /**销售日期*/
    @TableField("so_date")
    private LocalDate date;
    /**订单总金额*/
    @TableField("so_totalPrice")
    private Integer totalPrice;
    /**销售地址*/
    @TableField("so_address")
    private String address;
    /**销售订单详情对象*/
    @TableField(exist = false)
    private List<SellInfoBean> sellInfoBeanList;

    public SellOrderBean() {
    }

    public SellOrderBean(String customer, String address) {
        this.customer = customer;
        this.address = address;
    }

    public SellOrderBean(String customer, Integer totalPrice, String address) {
        this.customer = customer;
        this.totalPrice = totalPrice;
        this.address = address;
    }

    public Integer getSellOrderId() {
        return sellOrderId;
    }

    public void setSellOrderId(Integer sellOrderId) {
        this.sellOrderId = sellOrderId;
    }

    public String getCustomer() {
        return customer;
    }

    public void setCustomer(String customer) {
        this.customer = customer;
    }

    public String getSeller() {
        return seller;
    }

    public void setSeller(String seller) {
        this.seller = seller;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public Integer getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Integer totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public List<SellInfoBean> getSellInfoBeanList() {
        return sellInfoBeanList;
    }

    public void setSellInfoBeanList(List<SellInfoBean> sellInfoBeanList) {
        this.sellInfoBeanList = sellInfoBeanList;
    }

    @Override
    public String toString() {
        return "SellOrderBean{" +
                "sellOrderId=" + sellOrderId +
                ", customer='" + customer + '\'' +
                ", seller='" + seller + '\'' +
                ", date=" + date +
                ", totalPrice=" + totalPrice +
                ", address='" + address + '\'' +
                ", sellInfoBeanList=" + sellInfoBeanList +"\n"+
                '}';
    }
}
